On 11/7/07, Scott Blum wrote: > > You raise a lot of interesting issues. I'll have to think about this a > lot more, but I would encourage you to continue in the direction you're > heading, and let us know what roadblocks you run into. > > I will say that GWT's primary focus is on DHTML, but that doesn't rule out > the possibility of other doc types. Here's a first draft of generalizing GWT to support new document types, plus an SVG implementation. It turned out to be pretty straightforward and without a negative impact on "existing stuff". Change summary: * Generalize SelectionScriptTemplate to handle multiple document types and their corresponding templates - Define an enum for document type, each having an associated template and filename suffix. - Let the template define how to inject external scripts and stylesheets instead of assuming document.write(). - Define an SVG document type and template based on a simplification of the existing HTML template. * Define an XML namespace for GWT so that XML documents can include the XML equivalent of tags, using tags. Demonstrate how to find these in the new SVG bootstrap template. * Add a DocType module that defines a property provider for a new "doctype" property. Values detected so far: html, xhtml, xhtml2, svg, xul, unknown. With these changes, GWT+SVG just works. I've included the obligatory demo (this works in FireFox 2.0, haven't tried any other browsers). Try this link to see it: http://www.awarix.com/archie/DOMTest.svg Note how text on the page gets italicized by the stylesheet, which is injected by GWT. Here's the Java source for the above demo... using my DOM "wrapper" implementation (not shown): http://www.awarix.com/archie/DOMTest.java.txt FYI with these changes adding XHTML support to all of the existing GWT widgets would appear reasonably straightforward, requring only a new DOMImplXHTML.java class that would be keyed off the new "doctype" property. Let me know what you think. Thanks, -Archie -- Archie L. Cobbs CTO, Awarix, Inc. http://www.awarix.com